import React from 'react'
import Icon from '../Components/Icon'

function defaultItems(index = 0, length = 8) {
    return Array.from(new Array(length)).map((_val, i) => ({
        icon: 'https://os.alipayobjects.com/rmsportal/IptWdCkrtkAUfjE.png',
        text: `Name${i + index + 1}`,
        type: 'none'
    }))
}


function initialBasicItems() {
    const customArr = [
        {
            icon: <Icon name="ios-create" />,
            text: `签到`,
            type: 'sign'
        },
        {
            icon: <Icon name="ios-hand" />,
            text: `运动打卡`,
            type: 'sport'
        },
        {
            icon: <Icon name="ios-paw" />,
            text: `打赏`,
            type: 'reward'
        },
        {
            icon: <Icon name="ios-gift" />,
            text: `抽奖`,
            type: 'lucy-draw'
        },
        {
            icon: <Icon name="ios-today" />,
            text: `历史记录`,
            type: 'history'
        },
        {
            icon: <Icon name="ios-calendar" />,
            text: `纪念日计数`,
            type: 'anniversary'
        },
        {
            icon: <Icon name="logo-game-controller-b" />,
            text: `游戏中心`,
            type: 'game'
        },
        {
            icon: <Icon name="ios-refresh-circle" />,
            text: `数据同步`,
            type: 'sync'
        }
    ]
    return customArr.concat(defaultItems(customArr.length, 0))
}

function initialMoreItems() {
    return defaultItems()
}

export const baseItems = initialBasicItems()
export const moreItems = initialMoreItems()
